<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组合并与拆分</title>
  <script src="../../src/array/concat.js"></script>
</head>
<body>
  <script>
    //数组合并
    // let arr = [1,2,3]
    // const result = arr.concat([4,5,6])
    // console.log(result);
    // const result = concat(arr,[4,5,6],7,8)
    // console.log(result);

    //数组切片
    let arr = [1,3,5,7,9,15]
    // let result = arr.slice(1,5)
    // console.log(result)

    const result = slice(arr,1,5)
    console.log(result);
  </script>
</body>
</html>